<template>
	<view class="u-content">
		<view v-html="articleinfo.content" ></view>
	</view>
</template>

<script>
	import {
		article
	} from '@/utils/api/index.js'
	export default {
		data() {
			return {
				articleinfo: {},
				content: `
									<p>露从今夜白，月是故乡明</p>
									<img src="https://cdn.uviewui.com/uview/swiper/2.jpg" />
								`
			};
		},
		onLoad(data) {
			// this.goods_id = ;
			console.log(data.type, 'typetypetype')
			uni.setNavigationBarTitle({
				title: data.type
			});
			this.article(data.type)
			// this.getEleScrollTop();
		},
		methods: {
			async article(type) {
				console.log(type, 'typetypetype')
				const {
					code,
					data
				} = await article({
					biaoshi: type
				})
				if (code == 1) {
					this.articleinfo = data
					console.log(this.articleinfo.content)
				}
			}
		},
	}
</script>

<style>
	page {
		background-color: #FFFFFF;
	}
</style>
<style lang="scss" scoped>
	.u-content {
		padding: 24rpx;
		
	}
</style>